﻿<?php 
session_start();
if ($_session['user_guid'] == "" || $_session['user_guid'] == null)
{
//	header("Location:login.php");
}
require_once '../bin/Common/Mypage.class.php';
require_once '../bin/DBA/DB.class.php';
require_once '../bin/DAL/ProductsDAL.php';
require_once '../bin/BLL/ProductsBLL.php';
$products = ProductsBLL::GetItemByChs_Products();
$pagecode = $_GET["page"] == "" ? 1 : $_GET["page"];
$urlstring = "";
$pagedlg = Mypage::Chs_Paging_Get($count,10,$pagecode,"ModProducts.php");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>无标题页</title>
    <link href="../Files/Css/products.css" rel="stylesheet" type="text/css" />

    <script type="text/javascript" src="../Files/Javascript/jquery.js"></script>

    <script type="text/javascript" src="../Tools/tinymce/tinymce/tiny_mce.js"></script>

    <script language="javascript" type="text/javascript" src="../Tools/tinymce/editer.js"></script>

    <script type="text/javascript">
        jQuery(function($) {
            $(".content .main .record:last").addClass("nobor");
        });
    </script>
</head>
<body>
    <form id="form1" method="post">
     <div class="container">
        <div class="content">
        <div class="head">
                <div class="title">
                    <ul>
                        <li>产品管理</li>
                    </ul>
                </div>
                <div id="Div1">
                </div>
            </div>
            <div class="main">
                <div class="mid">
                    <div class="mid_content">
                    <table width="100%">
                    <tr>
                    <td style="width:40%">产品名称</td><td style="width:30%">略缩图</td><td style="width:30%">操作</td>
                    </tr>
                    <?php
                    for ($i=0;$i<count($products);$i++){
                     ?>
                    <tr>
                    <td><?php echo $products['name']?></td><td><a href="../Files/Upload/<?php echo $products['imgurl']?>" target="_blank"><img src='../Files/Upload/' alt='<?php echo $products['name']?>' width="100px" /></a></td><td><a href='EditProducts.php?guid=<?php echo $products['guid']?>'>修改</a>|<a href='DelProducts.server.php?guid=<?php echo $products['guid']?>'>删除</a></td>
                    </tr>
                    <?php }?>
                    </table>
                    <div><?php echo $pagedlg?></div>
                    </div>
                </div>
            </div>
        </div>
        <div id="clear">
        </div>
    </div>
    </form>
</body>
</html>